'use strict';

const gulp = require('gulp');
const webp = require('gulp-webp');

const picPath = {
  'common': 'src/assets/images',
  'swipe': 'src/assets/swipe',
}

gulp.task('jpgToWebp1', ()=> {
  return gulp
  .src(picPath.common + '/*')
  .pipe(webp())
  .pipe(gulp.dest(picPath.common))
});
gulp.task('jpgToWebp2', ()=> {
  return gulp
  .src(picPath.swipe + '/*')
  .pipe(webp())
  .pipe(gulp.dest(picPath.swipe))
});


gulp.task('default', ['jpgToWebp1', 'jpgToWebp2']);
